package top.krwlc.server.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import top.krwlc.server.pojo.User;

import java.util.Objects;

/**
 * krwlc
 * top.krwlc.server.dao
 *
 * @author Lanscarlos
 * @since 2022-04-05 16:38
 */
@Repository
public class SimpleUserDao implements UserDao {

    @Autowired
    public User user;

    @Override
    public boolean checkDisplay(String display) {
        return false;
    }

    @Override
    public boolean checkIdentityCode(String identityCode) {
        return false;
    }

    @Override
    public boolean checkPhone(String identityCode) {
        return false;
    }

    @Override
    public User select(String uid) {
        return user;
    }

    @Override
    public User select(String username, String password) {
        if (!user.getDisplay().equals(username) || !user.getPassword().equals(password)) return null;
        return user;
    }

    @Override
    public boolean insert(User user) {
        return false;
    }

    @Override
    public boolean updateDisplay(String uid, String display) {
        return false;
    }

    @Override
    public boolean update(User user) {
        return false;
    }

    @Override
    public boolean delete(User user) {
        return false;
    }
}
